import http from '@/api'
import { COMMON_ADMIN_API } from '@/api/axios/servicePort'

/**
 * @name 合同管理
 */
const ContractApi = {
  page: (params: any) => http.post(COMMON_ADMIN_API + '/contract/page', params),
  saveOrEdit: (params: any) => http.post(COMMON_ADMIN_API + '/contract/saveOrUpdate', params),
  remove: (params: any) => http.post(COMMON_ADMIN_API + '/contract/remove', params),
  getDetail: (id: string | number) => http.post(COMMON_ADMIN_API + '/contract/detail', { id }),
  getContractOverview: () => http.post(COMMON_ADMIN_API + '/contract/getOverview'),
  getContractTrend: (params: any) => http.post(COMMON_ADMIN_API + '/contract/getTrend', params),
  getContractPie: (params: any) => http.post(COMMON_ADMIN_API + '/contract/getPie', params),
  getTodayStats: () => http.post(COMMON_ADMIN_API + '/contract/getTodayStats'),
  startApproval: (params: any) => http.post(COMMON_ADMIN_API + '/contract/startApproval', params),
  approvalContract: (params: any) => http.post(COMMON_ADMIN_API + '/contract/approvalContract', params)
}

// 命名导出
export { ContractApi }

// 默认导出
export default ContractApi
